import {debounce} from "common/utils";
import backTop from "components/content/backTop/backTop";
export const itemListenerMixin = {
  data() {
    return{
      ItemListener: null
    }
  },
  mounted() {
    const refresh = debounce(this.$refs.scroll.Refresh(), 1000)
    this.ItemListener = () => {
      // refresh()
      this.$refs.scroll.Refresh()
    }
    this.$bus.$on('itemImageLoad', this.ItemListener)
  }
}

export const backtopMixin = {
  components:{
    backTop
  },
  data(){
    return{
      isShowBackTop:false
    }
  },
  methods:{
    backclick() {
      this.$refs.scroll.scrollTo(0, 0, 500)
    },
  }
}
